package com.zyz.G_常用类.BigDecimal;

import java.math.BigDecimal;

/**
 * @author: vick
 * @Date: 2025/3/19
 * @Description:
 * @version: 1.0
 */
public class Demo4 {


    public static void main(String[] args) {
        BigDecimal[] numbers = {
                new BigDecimal("1.23"),
                new BigDecimal("2.34"),
                new BigDecimal("3.45")
        };

        BigDecimal sum = BigDecimal.ZERO;

        for (BigDecimal num : numbers) {
            sum = sum.add(num);
        }
        System.out.println(sum);
    }
}
